<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
	<style>
		#con{
			margin: 10px;
			font-size: 24px;
		}
		ul{
			margin-bottom: 10px;
		}
		ul li{
			margin: 5px 10px;
			padding: 5px;
			color: #000;
			word-wrap: break-word;
		}

    .list-blo{
        background-color: #f0f0f0;
    }

    .friend-list{
      margin-bottom: 10px;
      background-color: #fff;
      font-size: 14px;
    }
    .list-top{
      display: flex;
      align-items: center;
      padding: 10px;
      font-size: 16px;
    }
    .lit-top-left{
      margin-right: 20px;
    }
    .lit-top-left img{
      width: 34px;
      height: 34px;
    }
    .list-center{
      padding: 0 10px;
    }
    .list-bottom{
      display: flex;
      align-items: flex-start;
      flex-wrap: wrap;
      padding: 10px;
    }
    .list-img{
      width: 32%;
      height: 85px;
      margin: 0.66%;
    }
    .list-img img{
      width: 100%;
      height: 100%;
    }
	</style>
</head>
<body>
  <div class="list-blo">
    <!-- <div class="friend-list">
      <div class="list-top">
        <div class="lit-top-left">
          <img src="../image/111.png" alt="">
        </div>
        <div class="list-top-right">
          <div>华辉精品市场</div>
          <div>2018-04-18 18:42:04</div>
        </div>
      </div>
      <div class="list-center">
        【华辉精品市场】推荐：梦幻灰 梦幻灰呈浅灰色，材质细腻，纹理变幻奇妙而灵动。观赏者无不感叹大自然的鬼斧神工，将空间的华丽高雅、超凡脱俗的格调显露无遗。广泛适用于酒店大堂、客厅、餐厅、会场、展览厅、商场等。 导购电话：13055246986
      </div>
      <div class="list-bottom">
        <div class="list-img">
          <img src="../image/qr-code.png" alt="">
        </div>
      </div>
    </div> -->

  </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery-1.10.2.min.js"></script>
<script type="text/javascript">

apiready = function(){
     var page = 1;
     api.ajax({
         url: 'https://appmarket.stoneonline.com/slsw/showfriends.do',
         method: 'post',
         data: {
           values: {
             weChatKey: '9237B361957490BA9644A710A5E3DD84',
             Data: {is_refresh:'true',page_num:'1',item_num:10,erpId:'1'},
           }
         }
     },function(ret, err) {
         if (ret) {
             if(ret.Result){
                 var data = ret.Data;
                 var listHtml = '';
                 var imgListHtml = '';
                 for(var i = 0; i < data.length; i++){
                      for(var j = 0; j < data[i].photos.length; j++){
                          imgListHtml += ' <div class="list-img">' +
                              '     <img src="'+ data[i].photos[j] +'" alt="">' +
                              '     </div> ';
                      }
                      listHtml = '    <div class="friend-list">' +
                          '<div class="list-top">' +
                          '<div class="lit-top-left">' +
                          '  <img src="'+ data[i].HZLogo +'" alt="">' +
                          '  </div>' +
                          '  <div class="list-top-right">' +
                          '  <div>'+ data[i].HZName +'</div>' +
                          '  <div>'+ data[i].create_time +'</div>' +
                          '  </div>' +
                          '  </div>' +
                          '  <div class="list-center">' + data[i].content +'  </div>' +
                          '  <div class="list-bottom">' + imgListHtml +'  </div>' +
                          '  </div>';
                      imgListHtml = '';
                      $('.list-blo').append(listHtml);
                  }
             }
         } else {
             api.alert({ msg: JSON.stringify(err) });
         }
     });

     // $api.byId('sys-info').innerHTML = str;

 };
</script>
</html>
